import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import VueLazyLoad from 'vue-lazyload'
import { setRem } from './utils/rem'
setRem()
// onresize 回调数组
window.resizeCallbackList = [setRem]
window.onresize = () => {
  window.resizeCallbackList.map(callback => {
    callback()
  })
}

Vue.config.productionTip = false

Vue.use(VueLazyLoad, {
  // 加载中的图片
  loading: "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fwww.sdxco.cn%2Fimages%2Femptybook.gif&refer=http%3A%2F%2Fwww.sdxco.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1661043507&t=5f9786dc440daea8e58bd533c0b87961",
  // 错误图片
  error: "https://img2.baidu.com/it/u=2545210976,4216576440&fm=253&fmt=auto&app=138&f=JPEG?w=600&h=500"
})


new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
